package in.kmb.inval;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class LandingActivity extends Activity {
    
    Button btnBasic, btnDbg, btnCustomView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.landing_page);
        btnBasic = (Button)findViewById(R.id.button1);
        btnDbg = (Button)findViewById(R.id.button2);
        btnCustomView = (Button) findViewById(R.id.button3);
                
        View.OnClickListener clickListener = new View.OnClickListener() {
            
            @Override
            public void onClick(View v) {
                if(v == btnBasic){
                    displayBasicVersion();
                } else if (v == btnDbg){
                    displayDebugVersion();
                } else if (v == btnCustomView){
                    displayCustomViewVersion();
                }
            }           
        };
        
        btnBasic.setOnClickListener(clickListener);
        btnDbg.setOnClickListener(clickListener);
        btnCustomView.setOnClickListener(clickListener);
    }
    
    private void displayDebugVersion() {
        Intent dbgIntent = new Intent(this, DebuggableInvalidateDrawableActivity.class);
        startActivity(dbgIntent);
    }

    private void displayBasicVersion() {
        Intent basicIntent = new Intent(this, InvalidateDrawableActivity.class);
        startActivity(basicIntent);
        
    }
    
    private void displayCustomViewVersion(){
        Intent customViewIntent = new Intent(this, CustomViewActivity.class);
        startActivity(customViewIntent);
    }
}
